<?php
ini_set('dafault_charset', 'UTF-8');


//class autoload (new Some_Class) Some/Class (in file system)
function __autoload($class_name){
    $path = str_replace("_","/",$class_name);
    include_once($path .".php");
}

//connect to DB
define('HOST', 'localhost');
define('USER','root');
define('PASSWORD', '');
define('DB_NAME','myroller');
$connect = mysql_connect(HOST,USER,PASSWORD) or die("Невозиожно подключиться к базе данных".mysql_error());
mysql_select_db(DB_NAME, $connect) or die ("Ошибка доступа к базе".mysql_error());
mysql_set_charset("utf8");

?>
